						 
		 **************************************************************
		 **															 **
		 ** Paper: Freedom of Foreign Movement and Human Trafficking **
		 **														     **
		 ** Authors: Sam R. Bell & Richard W. Frank 				 **
		 **															 **
		 ** Date: May 12, 2021										 **
		 **															 **
		 ** Task: Figure 4 - Marginal effects plot for Model 2		 **
		 **															 **
		 **************************************************************

		clear
		version 16.1
		set seed 1234

		** Change working directory
		cd "~"
	 
		use "ht_merged.dta"
		merge 1:1 ccode year using "ht_eba_ivs.dta"
		eststo clear	 
		global IVs "gdp_ln pop_ln " 
		sort ccode year
		tsset ccode year
	 
		estsimp  probit F.source fm W_fm_con12  interact_W_C_f12 $IVs , robust cluster (ccode) 

		setx ( gdp_ln  pop_ln    ) mean 
		setx  (fm) 0 
		simqi, fd(prval(1)) changex(W_fm_con12 0 2 interact_W_C_f12 0 0) level(95)
		setx  (fm) 1 
		simqi, fd(prval(1)) changex(W_fm_con12 0 2 interact_W_C_f12 0 2) level(95)
		setx  (fm) 2
		simqi, fd(prval(1)) changex(W_fm_con12 0 2 interact_W_C_f12 0 4) level(95)

		matrix C = (.55, .18, .85\.21, .03, .43\-.01, -.12, .14 )
		matrix colnames C = Effect LCI UCI
		matrix rownames C = Closed Moderate Open
		matrix list C
		coefplot matrix(C[,1]), ci((C[,2] C[,3]))
		clear matrix
	  
 
		
		
		
